//
// Created by 11510 on 2024/7/4.
//
#include <iostream>
#include <thread>
#include "MutexLock.h"
#include "MutexLockGuard.h"
#include "Condition.h"
using std::cout;
using std::endl;
using std::thread;


MutexLock mutexLock;
Condition condition;

void threadFunc1(void){

    printf("123");
    condition.broadcast();
}
void threadFunc2(void){
    condition.wait(mutexLock);
    printf("456");
}

int main(void) {
    thread th1(threadFunc1);
    thread th2(threadFunc2);

    th1.join();
    th2.join();

    return 0;
}